﻿
// ZEON @Copy Right 2020
// File: Users.cs
// Project:XWeChat.Model 
// Layer:Model
// Created:2020年12月08日 23点24分42秒
// By:ZEON
// ===================================================================

using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using Microsoft.AspNetCore.Identity;
namespace CMS.Model
{
    #region Users
    /// <summary>
    /// This is a Entity Object of a Users.
    /// </summary>
    public class User : IdentityUser
    {

        #region 公共属性 Public Properties



        /// <summary>
        /// 
        /// </summary>
        public int Usertype
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public string Realname
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public string Avatar
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public string Telephone
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public int LoginTimes
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public DateTime LastLoginTime
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public string LastLoginIP
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public DateTime CreateTime
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public sbyte Deleted
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public string Remark
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public string WXOpenID
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public string NickName
        {
            get; set;
        }


        /// <summary>
        /// 
        /// </summary>
        public string OrgId
        {
            get; set;
        }



        #endregion

        #region 构造方法
        /// <summary>
        /// 实例化对象Users
        /// </summary>
        public User()
        {
        }

        #endregion

    }

    /// <summary>
    /// 用户类型
    /// </summary>
    public enum Usertype
    {
        /// <summary>
        /// 管理员
        /// </summary>
        Administrator = 0,
        /// <summary>
        /// 普通用户
        /// </summary>
        User = 1,
        /// <summary>
        /// 工程师
        /// </summary>
        Worker = 2

    }
    #endregion

    #region Workers
    public class Worker : User
    {
        public float Score { get; set; }

        public int WorkOrderCount { get; set; }

        public int OrgCount { get; set; }

    }
    public class UserView : User
    {
        /// <summary>
        /// 审核状态:1待审核2通过3未通过
        /// </summary>
        public int AuditStatus { get; set; }

        /// <summary>
        /// 注册提交时间
        /// </summary>
        public DateTime SubmitTime { get; set; }
        public string OrgName { get; set; }
        public string WorkerId { get; set; }
        public int WorkOrderCount { get; set; }

    }

    public class DataSata
    {
        public int user;
        public int worker;
        public int workorder;
        public int payment;

    }

    #endregion

    #region profile
    public class Profile
    {
        public string UserName { get; set; }
        public string Avatar { get; set; }
        public string Password { get; set; }
        public string NewPassword { get; set; }
    }
    #endregion
}
